package com.xiaoke.service;

import com.xiaoke.entity.Comment;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@RestController
public interface CommentService {

    @PostMapping("/comment/insert")
    void insert(@RequestBody Comment comment, @RequestParam("images") String images);

    @GetMapping("/comment/countByGoods")
    Integer countByGoods(@RequestParam("goodsId") String goodsId);

    @GetMapping("/comment/findByGoodsAndPic")
    List<Map<String,Object>> findByGoodsAndPic(@RequestParam("goodsId") String goodsId, @RequestParam("pageNum") Integer pageNum, @RequestParam("pageSize") Integer pageSize, @RequestParam("showType") Integer showType);

    @GetMapping("/comment/countByGoodsPic")
    Integer countByGoodsPic(@RequestParam("goodsId") String goodsId);

}
